From 5fe9ebfe11002c870ebf6a12d3936990ed1aedfa Mon Sep 17 00:00:00 2001 From: Carlos Garnacho Date: Wed, 2 Jul 2014 15:35:07 +0200 Subject: [PATCH] entry: Do not unset selection if failing to update the primary selection This is expected to happen on wayland and other platforms with no primary selection, and just leads to the selected text being cleared after any attempt to change the text selection itself through either mouse/keyboard. --- gtk/gtkentry.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gtk/gtkentry.c b/gtk/gtkentry.c index d77c50fddc..abaa20b827 100644 --- a/gtk/gtkentry.c +++ b/gtk/gtkentry.c @@ -7332,9 +7332,8 @@ gtk_entry_update_primary_selection (GtkEntry *entry) if (gtk_editable_get_selection_bounds (GTK_EDITABLE (entry), &start, &end)) { - if (!gtk_clipboard_set_with_owner (clipboard, targets, n_targets, - primary_get_cb, primary_clear_cb, G_OBJECT (entry))) - primary_clear_cb (clipboard, entry); + gtk_clipboard_set_with_owner (clipboard, targets, n_targets, + primary_get_cb, primary_clear_cb, G_OBJECT (entry)); } else { -- 2.30.2